import React from 'react';
import ReactDOM from 'react-dom';

import App from './App';

import 'antd/dist/antd.css'

import './static/index.scss'

import axios from 'axios'
// 配置基地址
axios.defaults.baseURL = 'http://118.190.80.166:48002'
// 配置拦截器 （ 为 ajax 添加令牌 ）
axios.interceptors.request.use(function (config) {
    let token = sessionStorage.getItem('token')
    if (token !== null) {
        config.headers.Authorization = 'Bearer ' + token
    }
    return config
})

ReactDOM.render(<App />, document.getElementById('root'));

